﻿// MIT License
//
// Copyright (c) 2023-present markeluo

using Admin.NET.Core.Service;
using DingTalk.Api.Response;
using DingTalkAPIHelp.Kaoqin;
using System.Collections.Generic;
using System.ComponentModel;
using static DingTalk.Api.Response.OapiAttendanceGetsimplegroupsResponse;

namespace Admin.NET.Application.Service.Hr.Attendance;
public class AttendanceGroupService : IDynamicApiController, ITransient
{
    /// <summary>
    /// 获取考勤组列表
    /// </summary>
    /// <param name="input"></param>
    /// <returns></returns>
    [DisplayName("考勤组列表")]
    [HttpGet("/api/AttendanceGroup/list")]
    public async Task<dynamic> list([FromQuery] PageEmployeeInput input)
    {
        List<AtGroupForTopVoDomain> pagelist = null; 
        KaoqinManager manager= new KaoqinManager();
        OapiAttendanceGetsimplegroupsResponse response= manager.GetGroupDetailList(input.Page, input.PageSize);

        pagelist = response.Result.Groups;
        return pagelist;
    }
}
